package java50practice;

public class Practice21 {
	public static void main(String[] args) {
		long sum=0;
		for (int i = 1; i <=20 ; i++) {
			sum+=Factorial(i);
		}
		System.out.println(sum);
	}

	private static long Factorial(int num) {
		if (num <=1) {
			return 1;
		}
		return num * Factorial(num - 1);
	}
}
